# Maintainer:
pkgname=fcitx5-kkc
pkgver=5.1.0
pkgrel=0
pkgdesc="libkkc input method support for fcitx5"
url="https://github.com/fcitx/fcitx5-kkc"
# armhf: extra-cmake-modules
arch="all !armhf"
license="GPL-3.0-or-later"
makedepends="
	cmake
	extra-cmake-modules
	gettext-dev
	fcitx5-dev
	fcitx5-qt-dev
	libkkc-dev
	qt5-qttools-dev
	samurai
	"
subpackages="$pkgname-lang"
source="$pkgname-$pkgver.tar.gz::https://github.com/fcitx/fcitx5-kkc/archive/refs/tags/$pkgver.tar.gz
	cxx17.patch
	"
options="!check" # no tests

build() {
	CFLAGS="$CFLAGS -flto=auto" \
	CXXFLAGS="$CXXFLAGS -flto=auto" \
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
fae4e9fc5443de07f32522646ce0d21ee52e5f8c44d835c45e5dde179b1e5b376123dd880e546315bb543fe6dc510fb22a0620e9eb4fbba1a11568eaf5236e0f  fcitx5-kkc-5.1.0.tar.gz
e58e74bc15497462414d2fbb99c0685249de5f5a5850d39696dfde7e3c171d5932a9b2f4bfd3d4a9c2e2d103ad2456cd2e7d0545a254b55b79cecb08d953d779  cxx17.patch
"
